package com.sbj.service.impl;

import cn.hutool.core.convert.Convert;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sbj.dto.req.LogisticsReq;
import com.sbj.entity.Logistics;
import com.sbj.mapper.LogisticsMapper;
import com.sbj.service.LogisticsService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author summer
 * @version 1.0
 * @date 2024/8/30 22:41
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class LogisticsServiceImpl extends ServiceImpl<LogisticsMapper, Logistics> implements LogisticsService {


    @Override
    public void saveLogistics(LogisticsReq logisticsReq) {
        Logistics convert = Convert.convert(Logistics.class, logisticsReq);
        this.save(convert);
    }
}
